<template>
  <div>
     <h3>
      <router-link class="left" to="/">&lt;</router-link>
      <span>频道管理</span>
      <div v-show="allNav.length>0">
点击删除以下频道
      </div>
      <ul class="allNav">
        <li v-for="(item,index) in allNav" :key="index" @click="deleteItem(index)">{{item}}</li>
      </ul>
 <div v-show="$store.state.addDeleteNav.length>0">
点击删除以下频道
      </div>
      <ul class="allArr">
        <li v-for="(item,index) in $store.state.allArr" :key="index" @click="deleteItem(index)">{{item}}</li>
      </ul>
     </h3>
 
  </div>
</template>
<script>

export default {
  name: "channelManage55",
  components: {
    
  },
  data(){
    return{
      allNav:this.$store.state.allNav
    }
  },
  methods: {
    deleteItem(index){
      this.$store.commit("deleteItem",index)
    },
    addItem(index){
      this.$store.commit("addItem",index)
    },
  },
 
};
</script>
<style scoped>
.left{
  position: absolute;
  left: 20px;
}
h3{
  width: 100%;
  text-align: center;
  background-color: #d43d3d;
  color: #fff;
  height: 30px;
  line-height: 30px;
  }
  a{
    color: #fff;
  }
 

h3+div{
  margin-left: 10px;
  margin-bottom: 10px;
}
.allNav{
  display: flex;
  flex-wrap: wrap;
}
.allNav li{
  text-align: center;
  border: 1px solid #ddd;
  margin: 10px 10px;
  box-sizing: border-box;
  padding: 5px 15px;
  color: black
}


</style>